package com.mutual.assistance.user.model.vo;

import com.mutual.assistance.validation.ValidationGroups;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.Email;
import javax.validation.constraints.NotBlank;
import java.io.Serializable;

@Data
@ApiModel(value="用户注册信息", description="用户注册信息")
public class RegisterUserVO implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "用户名")
    @NotBlank(message = "用户名不能为空", groups = ValidationGroups.Insert.class)
    private String username;

    @ApiModelProperty(value = "密码")
    @NotBlank(message = "密码不能为空", groups = ValidationGroups.Insert.class)
    private String password;

    @ApiModelProperty(value = "用户昵称")
    private String nickname;

    @ApiModelProperty(value = "用户性别（1：男、0：女）")
    @NotBlank(message = "性别不能为空", groups = ValidationGroups.Insert.class)
    private String sex;

    @ApiModelProperty(value = "用户邮箱")
    @Email(message = "用户邮箱格式不对", groups = ValidationGroups.Insert.class)
    private String email;

    @ApiModelProperty(value = "验证码")
    @NotBlank(message = "验证码不能为空", groups = ValidationGroups.Insert.class)
    private String code;
}
